<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/25
  Time: 14:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>显示所有的人</title>
  </head>
  <body>
  <a href="${pageContext.request.contextPath}/person?method=toAddPage">添加人员</a>
  <a href="${pageContext.request.contextPath}/logout">注销</a>
    <table border="1px">
      <tr style="background-color: cadetblue">
        <td>人员编号</td>
        <td>人员姓名</td>
        <td>户口所在地</td>
        <td>人员年龄</td>
        <td>家庭地址</td>
        <td colspan="2">操作</td>
      </tr>
       <c:forEach items="${allPerson}" var="person">
         <tr>
           <td>${person.person_id}</td>
           <td>${person.person_name}</td>
           <td>${person.area_name}</td>
           <td>${person.person_age}</td>
           <td>${person.person_address}</td>
           <td><a href="${pageContext.request.contextPath}/person?method=toUpdatePage&person_id=${person.person_id}">编辑</a></td>
           <td><a href="${pageContext.request.contextPath}/person?method=delete&person_id=${person.person_id}">删除</a></td>
         </tr>
       </c:forEach>
    </table>
  </body>
</html>
